package com.icart.repositories;


import com.icart.entities.MkSaleinfoEntity;
import org.springframework.context.annotation.Scope;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Scope("prototype")
public interface MksalepicRepository extends BaseRepository<MkSaleinfoEntity,Integer> {
    @Transactional
    @Query(nativeQuery = true,value = "insert into mk_salepic(oid,chnid,picurl,pickind) values(?1,?2,?3,?4)")
    @Modifying(clearAutomatically = true)

    Integer insert(String oid, Long chnid,String picurl,int pickind);

    @Transactional
    @Query(nativeQuery = true,value = "delete from mk_salepic where picid=?1")
    @Modifying(clearAutomatically = true)

    Integer deletepic(Long picid);


}
